package com.frejoys.common.dto.goods;

import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import lombok.Data;

import java.math.BigDecimal;

/**
 * @author wangzhicheng
 * @version 1.0
 * @date 2024/4/22 9:37
 */
@Data
public class GoodsSaveDto {
    //商品id
    @Schema(type = "Integer", name = "id", description = "商品id", defaultValue = "1")
    private Integer id;

    // 品类id
    @NotNull(message = "{600}")
    @Schema(type = "Integer", name = "categoryId", description = "品类id", required = true, defaultValue = "1")
    private Integer categoryId;

    // 店铺id
    @NotNull(message = "{600}")
    @Schema(type = "Integer", name = "storeId", description = "店铺id", required = true, defaultValue = "1")
    private Integer storeId;

    // 名称
    @NotBlank(message = "{600}")
    @Schema(type = "Integer", name = "name", description = "名称", required = true, defaultValue = "1")
    private String name;

    // 商品封面图
    @NotBlank(message = "{600}")
    @Schema(type = "Integer", name = "cover", description = "商品封面图", required = true)
    private String cover;

    // 现价
    @NotNull(message = "{600}")
    @Schema(type = "BigDecimal", name = "price", description = "现价", required = true, defaultValue = "1")
    private BigDecimal price;

    // 原价
    @NotNull(message = "{600}")
    @Schema(type = "BigDecimal", name = "oriPrice", description = "原价", required = true, defaultValue = "1")
    private BigDecimal oriPrice;

    // 库存数量
    @NotNull(message = "{600}")
    @Schema(type = "Integer", name = "repCount", description = "库存数量", required = true, defaultValue = "1")
    private Integer repCount;

    // 排序
    @Schema(type = "Integer", name = "sort", description = "排序", defaultValue = "1")
    private Integer sort;
}
